/** @type {import('next-sitemap').IConfig} */
module.exports = {
  siteUrl: process.env.NEXT_PUBLIC_BASE_URL,
  generateRobotsTxt: true,
  sitemapSize: 5000,
  changefreq: 'daily',
  priority: 0.7,
  exclude: ['/admin/*', '/api/*'],
  robotsTxtOptions: {
    policies: [
      {
        userAgent: '*',
        allow: '/',
        disallow: ['/admin/*', '/api/*'],
      },
    ],
    additionalSitemaps: [
      `${process.env.NEXT_PUBLIC_BASE_URL}/sitemap-articles.xml`,
      `${process.env.NEXT_PUBLIC_BASE_URL}/sitemap-products.xml`,
      `${process.env.NEXT_PUBLIC_BASE_URL}/sitemap-collections.xml`,
      `${process.env.NEXT_PUBLIC_BASE_URL}/sitemap-blogs.xml`,
    ],
  },
};
